<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateCinemasTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('cinemas', function (Blueprint $table) {
            $table->increments('id');
            $table->string('code',20)->nullable();
            $table->string('name',20);
            $table->string('corporation',30)->nullable();
            $table->string('contact',10)->nullable();
            $table->string('telephone',20)->nullable();
            $table->string('email',50)->nullable();
            $table->string('fax',20)->nullable();
            $table->integer('chain_id')->nullable();
            $table->string('chain_code',20);
            $table->string('chain_name',50)->nullable();
            $table->string('province',20)->nullable();
            $table->string('city',20)->nullable();
            $table->string('district',20)->nullable();
            $table->string('address',30)->nullable();
            $table->integer('screen_count')->default(0);
            $table->string('business_date')->nullable();
            $table->integer('status')->default(0);
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('cinemas');
    }
}
